package com.rt.dao;

import com.rt.dao.impo.impoDao;
import entity.hrio;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import util.com.Alipool;

import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.Collections;
import java.util.List;

public interface ExcdlDao {
    public static void main(String[] args) throws Exception {
        HeroDao daoq=new impoDao();
        ClassLoader classLoader = ExcdlDao.class.getClassLoader();
        String filename = "hello.xlsx";
        InputStream input = classLoader.getResourceAsStream(filename);
        XSSFWorkbook sheets = new XSSFWorkbook(input);
        XSSFSheet sheet = sheets.getSheetAt(0);
        String tr;
        //获取行数
        int rows = sheet.getPhysicalNumberOfRows();
        XSSFRow row = sheet.getRow(0);
        int cols = row.getPhysicalNumberOfCells();
        System.out.println("文件有多少行"+rows);
        System.out.println("文件有多少列"+cols);
        for (int i=0;i<rows;i++){
            row=sheet.getRow(i);
            String c1=row.getCell(0).toString();
            String c2=row.getCell(1).toString();
            String c3=row.getCell(2).toString();
           // tr=c1;
          //  int stq=Integer.valueOf(tr).intValue();
          //  System.out.println(stq);
            System.out.println(c1+"--"+c2+"---"+c3);
            boolean list=daoq.qqzc账号(c1, c2, c3);
        }

        sheets.close();
    }
}
